package springholamundodi;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.FileSystemResource;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Academico
 */
public class SpringHolaMundoDI {
    public static void main(String[] args) throws Exception {

        // get the bean factory
        BeanFactory factory = new XmlBeanFactory(new FileSystemResource("beans.xml"));
        Impresora imp = (Impresora) factory.getBean("impresora");
        imp.imprimir();
    }
}
